package com.itheima.algorithm.recursion_single;

/**
 * @author: TylerZhong
 * @description:
 */
public class E06Sum {
    public static long sum(int n){
        if (n == 1) {
            return 1;
        }
        return n + sum(n - 1);
    }

    public static void main(String[] args) {
        long sum = sum(15000);
        System.out.println(sum);
    }
}
